package com.person.jiaiplan.pojo.signle;

import cn.hutool.core.lang.Snowflake;

/**
 * 单例模式下的雪花 -静态内部类
 */
public class SignleSnowFlake {

    private static final Snowflake SNOWFLAKE = new Snowflake(1, 1);

    /**
     * 雪花算法生成唯一ID
     */
    public static Long getSnowflakeId() {
        return SNOWFLAKE.nextId();
    }


}
